#pragma once

#include "MuObject.h"

namespace Next 
{
	namespace GameServer
	{
		namespace Factorys
		{
			using namespace Objects;

			class CMuObjectFactory
			{
			public:
				CMuObjectFactory();
				~CMuObjectFactory();

			public:
				CMuObject* CreateObject(MuObjectType type);
			};

			/*static class CIDGenerator
			{
			private :
				static CIDGenerator* _Instance;
				static unsigned short _playerId;
				static unsigned short _monsterId;
			
				CIDGenerator() 
				{
					_playerId = 0;
				}

			public://static
				static CIDGenerator* Instance()
				{
					if( !_Instance )
					{
						_Instance = new CIDGenerator();
					}

					return _Instance;
				}

			public://non static
				unsigned short GenerateId(MuObjectType type)
				{
					switch( type )
					{
					case Player:
						{
							if( CIDGenerator::_playerId == MAX_PLAYERS )
							{
								CIDGenerator::_playerId = 0;
							}
							return CIDGenerator::_playerId++;
						}
						break;
				
					case Monster:
						{
							if( CIDGenerator::_monsterId == MAX_MONSTERS )
							{
								CIDGenerator::_monsterId = 0;
							}

							return CIDGenerator::_monsterId++;
						}
						break;
					}
				
				}
			};*/
		}
	}
}

